/* Asegurar que el checkbox, texto, y toggle-icon estén en la misma línea */
.filtro-box ul li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px; /* Espacio entre elementos */
}

/* Hacer que el contenedor de "Corrugada" mantenga todo alineado */
.filtro-box ul li h4 {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}
h4 .toggle-icon {
    padding-left: 97px;
    color: #717171;
}
.filtro-box ul li h4 .toggle-icon {
    margin-left: auto; /* Empujar el ícono hacia la derecha */
    cursor: pointer;
    color: #000;
}

aside {
    width: 250px; /* Ancho fijo para los filtros */
    flex-shrink: 0; /* Evita que se reduzca */
    top: 120px; /* Ajusta según la altura de tu header */
    max-height: max-content; /* Elimina la restricción de altura */
    align-self: flex-start;
}

/* Ajustar checkbox y texto */
.filtro-box ul li input[type="checkbox"] {
    margin-right: 8px; /* Espacio entre checkbox y el texto */
}

/* Subcategorías (listas anidadas) */
.otras-subcategoria {
    margin-left: 20px; /* Indentar subcategorías */
    display: none; /* Ocultas por defecto */
}
.filtro-box {
    height: auto; /* Adjust height automatically */
    max-height: 260px; /* Elimina la restricción de altura */
    overflow-y: auto; /* Permite el desplazamiento vertical */
    width: 200px;
    background: #ffffff;
    padding: 0rem 20px;
    border-radius: 3px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1.5px solid #717171;
    padding-left: 0;
    overflow-x: hidden;
}

.filtro-box h3 {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0rem 1rem;
    padding-top: 0.5rem;
    padding-bottom: 8px;
    border-radius: 5px;
    margin: 0;
    transition: background 0.3s ease;
    width: 96%;
}

.filtro-box h3:hover {
    background: #acacac14;
}
.toggle-icon {
    margin-left: 10px;
}
.toggle-icon i {
    transition: transform 0.5s ease;
    transform: rotate(180deg); /* Inicia apuntando hacia arriba */
    margin-left: 10px;
    left: 500px;
}

.filtro-box h3.active .toggle-icon i {
    transform: rotate(0deg); /* Apunta hacia abajo cuando el filtro está expandido */
}
h3.active{
    padding-bottom: 5px;
}
.filtro-box ul {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0;
    max-height: 0; /* Oculta los ul de filtros por defecto */
    opacity: 0;
    overflow: hidden; /* Quita overflow-y: auto aquí */
    scrollbar-width: none; /* Quita la barra interna en Firefox */
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
}

/* Elimina los estilos de scrollbar internos */
.filtro-box ul::-webkit-scrollbar {
    display: none;
}

.filtro-box ul.active {
    max-height: 500px; /* Expande el ul cuando tiene la clase .active */
    opacity: 1;
    margin-top: 0.5rem;
    overflow: visible; /* Quita overflow-y: auto aquí */
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
}

.filtro-box li {
    margin: 0.5rem 0;
}

.filtro-box input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}
/* Estilo para la subcategoría "Otras" dentro de Marcas */
.otras-subcategoria {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.7s ease, opacity 0.5s ease;
    padding-left: 1.5rem; /* Tabulación */
}

.otras-subcategoria.active {
    max-height: 500px; /* Ajusta según sea necesario */
    opacity: 1;
    margin-top: 0.5rem;
}

/* Estilo para el encabezado de "Otras" */
.filtro-box h4 {
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    margin: 0.5rem 0;
    width: 100%;
}
.otras-subcategoria.active {
    display: block; /* Mostrar subcategorías al expandir */
}
.boton-medidas {
    display: flex;
    flex-wrap: wrap;
    gap: 5px; /* Espacio entre botones */
    margin-top: 5px;
}

.medida-boton {
    padding: 10px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.medida-boton:hover {
    background-color: #FFD700; /* Color al pasar el cursor */
    color: #000;
    border-color: #FFC107;
}

.medida-boton.active {
    background-color: #FFD700; /* Color cuando se selecciona */
    color: #000;
    border-color: #FFC107;
}
.dropdown-lista {
    background-color: #ffffff;
    border: 1px solid #9d9d9d;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    color: #555;
    outline: none;
    transition: border-color 0.3s ease;
    text-align: left;
}

.dropdown-lista:focus {
    border-color: #000000;
    box-shadow: 0 0 4px rgba(18, 140, 126, 0.5);
}
/* Estilo del ícono de información */
.info-icon-card {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #128c7e;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    z-index: 10;
}

.info-icon-card:hover {
    color: #086d61;;
}

/* Estilo de la tarjeta de información */
.info-card {
    position: absolute;
    top: 10px;
    right: -270px;
    width: 250px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10;
    font-family: 'Quicksand', sans-serif;
    text-align: justify;
}

.info-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
}

/* Mostrar la tarjeta de información */
.info-card.active {
    display: block;
}

.instrucciones {
    color: #333;
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    text-align: center;
    padding: 10px 20px;
    margin: 10px auto;
    border-radius: 8px;
    max-width: 1200px; /* Limitar el ancho al tamaño del contenedor */
}

.instrucciones p {
    margin: 0;
}
/* Estilos para el ícono de filtro en móviles */
.filtro-icono {
    display: none; /* Oculto por defecto */
    font-size: 24px;
    cursor: pointer;
    color: #000000;
    margin-left: auto; /* Lo coloca a la derecha */
    padding: 10px;
    padding-top: 15px;
    padding-right: 25px;
}

/* Mostrar el ícono de filtro solo en móviles */
@media (max-width: 768px) {
    .filtro-icono {
        display: block;
    }

    /* Ocultar el aside de filtros en móviles */
    aside {
        display: none;
    }

    /* Estilos para el menú desplegable de filtros */
    .filtro-menu-movil {
        position: fixed;
        top: 0;
        right: -100%; /* Oculta el menú fuera de la pantalla */
        width: 80%; /* Ancho del menú */
        height: 100%;
        background-color: #fff;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1000; /* Asegura que esté por encima de otros elementos */
        overflow-y: auto; /* Permite desplazamiento si hay muchos filtros */
    }

    /* Mostrar el menú cuando está activo */
    .filtro-menu-movil.active {
        right: 0;
    }

    /* Estilos para el ícono de cerrar */
    .filtro-cerrar {
        text-align: right;
        padding: 10px;
        font-size: 24px;
        cursor: pointer;
        color: #333;
        display: block; /* Mostrar solo en móviles */
    }
}

/* Ocultar el ícono de cerrar en escritorio */
@media (min-width: 769px) {
    .filtro-cerrar {
        display: none;
    }
}
@media (max-width: 768px) {
    .filtro-menu-movil {
        padding: 20px;
    }
    
    .filtro-menu-movil .filtro-box {
        width: 100%;
        max-height: none;
        margin-bottom: 15px;
    }
    
    .filtro-cerrar {
        position: sticky;
        top: 0;
        background: white;
        padding: 15px;
        z-index: 1001;
    }
    .info-card {
        right: 40px;
        top:20px;
    }
    .filtro-box {
        width: 100%;
        padding-left: 0;
        margin-bottom: 0; /* Elimina el espacio entre cajas en móviles */
    }
}
/* Estilos para el menú lateral en móviles */
.menu-filtros {
    position: fixed;
    top: 0;
    right: -100%; /* Oculta el menú fuera de la pantalla a la derecha */
    width: 100%; /* Puedes ajustar el ancho si lo deseas */
    height: 100%;
    background: #ffffff; /* Fondo blanco */
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.menu-filtros.mostrar {
    right: 0; /* Muestra el menú deslizándolo desde la derecha */
}

/* Encabezado del menú */
.menu-filtros header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.menu-filtros header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.menu-filtros header button:hover {
    color: #555;
}

/* Contenedor de filtros */
.menu-filtros .contenedor-filtros {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Secciones de filtros */
.filtro-box {
    margin-bottom: 20px;

    transition: border-color 0.3s ease;
}

.filtro-box h3 {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s ease;
}

.filtro-box h3:hover {
    color: #000;
}

.filtro-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0; /* Oculta los ul de filtros por defecto */
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
}

.filtro-box ul.active {
    max-height: 500px; /* Expande el ul cuando tiene la clase .active */
    opacity: 1;
    margin-top: 0.5rem;
    overflow: visible;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
}

/* Elementos de la lista */
.filtro-box ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filtro-box ul li input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.filtro-box ul li input[type="checkbox"]:checked {
    border-color: #333;
}

/* Botón de acción */
.menu-filtros .boton-aplicar {
    background: #000;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.menu-filtros .boton-aplicar:hover {
    background: #333;
}

/* Botón "Borrar todo" */
.menu-filtros .boton-limpiar {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 0.9rem;
    text-align: right;
    cursor: pointer;
    margin-bottom: 10px;
}

.menu-filtros .boton-limpiar:hover {
    text-decoration: underline;
}

.filtro-icono {
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Reemplaza los estilos actuales de #cerrar-filtros por estos: */
#cerrar-filtros {
    background: none;
    border: none;
    color: #000;
    font-size: 18px;
    cursor: pointer;
    position: absolute;
    right: 35px;
    padding: 5px;
    z-index: 1001;
    margin-top: 13px;
    right: 13px;
}

#cerrar-filtros i {
    transition: transform 0.3s ease;
}

#cerrar-filtros:hover i {
    transform: scale(1.2);
    color: #555;
}

/* Estilos para copiar los filtros en móviles */
#contenedor-filtros {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Ocultar el aside en móviles */
@media (max-width: 768px) {
    aside {
        display: none;
    }
}
/* Modifica el filtros-otras.css */

/* Asegúrate que estos estilos solo apliquen en móviles */
@media (max-width: 768px) {
    .menu-filtros {
        display: block; /* Solo visible en móviles */
        /* resto de estilos... */
    }
    
    .filtro-icono {
        display: block; /* Solo visible en móviles */
    }
    .filtro-box {
        width: 100%; /* Ancho completo en móviles */
        padding-left: 0; /* Sin padding izquierdo */
        padding-right: 0    ;
        border-radius: 0;
        margin-bottom: 0;
        border-left-width:0 ;
        border-right-width:0 ;
    }
    .filtro-box h3 {
        padding: 0; /* Sin padding en el encabezado */
        padding-top: 0px;
        padding-left: 5px;
        border-radius: 0px;
        padding-bottom: 8px;
        margin: revert;
        padding-left: 15px;
    }
}

@media (min-width: 769px) {
    .menu-filtros {
        display: none !important; /* Nunca mostrar en escritorio */
    }
    
    .filtro-icono {
        display: none !important; /* Nunca mostrar en escritorio */
    }
    
    aside {
        display: block !important; /* Siempre mostrar en escritorio */
    }
}
.producto.ocultar {
    display: none !important;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.producto.mostrar {
    display: block;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#filtros-aside {
    display: none;
    position: relative; /* Para el botón de cerrar */
}

#filtros-aside.mostrar {
    display: block;
}

